﻿#region Copyright

//  ======================================================
//      Copyright (c) 2011 Toulr All rights reserved.
//     
//      The use and distribution terms for this software are contained in the file
//      named license.txt, which can be found in the root of this distribution.
//      By using this software in any fashion, you are agreeing to be bound by the
//      terms of this license.
//     
//     You must not remove this notice, or any other, from this software.
//  ======================================================

#endregion

#region Using Namespaces

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Toulr.Domains.Account;

#endregion

namespace Toulr.Domains.Business
{
    public class Promotions:IEntity
    {
        #region Property

        /// <summary>
        ///   团购记录ID
        /// </summary>
        [Key]
        public Int32 Id { get; set; }

        [MaxLength(64)]
        public String Title { get; set; }

        /// <summary>
        ///   团购触发用户
        /// </summary>
        public int TriggerManUserId { get; set; }

        /// <summary>
        ///   商品ID
        /// </summary>
        public int GoodsId { get; set; }

        /// <summary>
        ///   发起团购时的店长
        /// </summary>
        public int ShopManagerUserId { get; set; }

        /// <summary>
        ///   团购发起时间
        /// </summary>
        public DateTime StartTime { get; set; }

        /// <summary>
        ///   团购结束时间
        /// </summary>
        public DateTime EndTime { get; set; }

        /// <summary>
        ///   已参加团购人数
        /// </summary>
        public int GoodSales { get; set; }

        /// <summary>
        ///   原价
        /// </summary>
        public float OriginalPrice { get; set; }

        /// <summary>
        ///   运费
        /// </summary>
        public float FreightPrice { get; set; }

        /// <summary>
        ///   是否已成功
        /// </summary>
        public bool Success { get; set; }

        /// <summary>
        ///   认证字符，用于作为一个团购的标识串，在推广过程中使用
        /// </summary>
        [MaxLength(128)]
        public String Certificate { get; set; }

        /// <summary>
        ///   推广信息描述
        /// </summary>
        [MaxLength(256)]
        public String Promotion { get; set; }

        /// <summary>
        ///   店长是否已确认
        /// </summary>
        public bool ManagerConfirmed { get; set; }

        /// <summary>
        ///   店主是否已确认
        /// </summary>
        public bool ShopKeeperConfirmed { get; set; }

        /// <summary>
        ///   网站管理员是否已经确认
        /// </summary>
        public bool AdministratorConfirmed { get; set; }

        /// <summary>
        ///   团购审批是否已经通过
        /// </summary>
        public bool Confirmed { get; set; }

        /// <summary>
        ///   团购是否已经结束
        /// </summary>
        public bool Done { get; set; }
        /// <summary>
        /// 是否推荐团购
        /// </summary>
        public bool IsRecommended { get; set; }

        #endregion

        #region Associaction Objects

        /// <summary>
        ///   团购触发用户
        /// </summary>
        [NotMapped]
        public virtual User TriggerMan
        {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        ///   发起团购时的店长
        /// </summary>
        [NotMapped]
        public virtual User ShopManager
        {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        ///   折扣信息记录
        /// </summary>
        [NotMapped]
        public virtual ICollection<PromotionsDiscount> PromotionsDiscounts
        {
            get { throw new NotImplementedException(); }
        }

        #endregion
    }
}